package com.jc.aarpackdemo;

import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

import com.jc.cm.Lost;

//import com.jc.so.SoLoad;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        try {
            ApplicationInfo appInfo = this.getPackageManager().getApplicationInfo(getPackageName(), PackageManager.GET_META_DATA);
            String UMENG_CHANNEL_VALUE = appInfo.metaData.getString("UMENG_CHANNEL");
            Toast.makeText(this, "该包来自" + UMENG_CHANNEL_VALUE + "渠道", Toast.LENGTH_LONG).show();
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }

//        SoLoad.test("just");

        ((TextView)findViewById(R.id.cm)).setText(Lost.test());
        Lost.print();
    }
}
